<!DOCTYPE html>
<script src="../../resources/testharness.js"></script>
<script src="../../resources/testharnessreport.js"></script>
<body>
<script>
  test(() =>{
    var iframe = document.body.appendChild(document.createElement("iframe"));
    document.body.offsetTop;
    iframe.appendChild(document.createElement("optgroup"));
    iframe.appendChild(document.createTextNode(""));
    document.body.offsetTop;
    iframe.style.color = "pink";
  }, "Check that style recalc of iframe with optgroup and text child does not crash.");
</script>
